package com.csun.cmny.provider.dao;

import com.csun.cmny.provider.model.domain.DmcWatchData;
import com.csun.cmny.provider.model.vo.WatchOldmanAddressVo;
import com.csun.cmny.provider.model.vo.watch.DmcWatchDataVo;
import org.apache.ibatis.annotations.Param;
import tk.mybatis.mapper.common.Mapper;

import java.util.List;
import java.util.Map;

public interface DmcWatchDataMapper extends Mapper<DmcWatchData> {

    /**
     * show data by device id
     *
     * @param deviceId  device id
     *
     * @return  dmc watch data vo
     */
    DmcWatchDataVo showDataByDeviceId(Long deviceId);

    /**
     * query watch oldman address by oldman id list
     *
     * @param oldmanIds oldman id list
     *
     * @return  the list watch oldman address vo by oldman id list
     */
    List<WatchOldmanAddressVo> queryWatchOldmanAddressByOldmanIds(@Param("oldmanIds") List<Integer> oldmanIds);

    /**
     * @description: TODO
     * @param: oldmanId 老人ID
     * @return: 老人设备最新一次数据
     * @throws
     * @author huangxm
     * @date 2019/3/15 11:58
     */
    Map<String,Object> getRecentData(@Param("oldmanId")Integer oldmanId);
}